
var CQueue = function() {
    this.inputStack=[]
    this.outputStack=[]
};

/** 
 * @param {number} value
 * @return {void}
 */
CQueue.prototype.appendTail = function(value) {
   this.inputStack.push(value)
};

/**
 * @return {number}
 */
CQueue.prototype.deleteHead = function() {
    if(this.outputStack.length===0){
        while(this.inputStack.length>0){
            this.outputStack.push(this.inputStack.pop())
        }
    }
    return this.outputStack.pop()??-1
};

/** 
 * Your CQueue object will be instantiated and called as such:
 * var obj = new CQueue()
 * obj.appendTail(value)
 * var param_2 = obj.deleteHead()
 */